home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14201 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: news.sara.nl!ct-pc6
  2. From: brands@chemeng.chem.uva.nl (Danny Brands)
  3. Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.win32
  4. Subject: Re: VC++ 4.0 memory allocation slower than in 2.x!!!
  5. Date: Fri, 29 Mar 96 10:18:44 GMT
  6. Organization: ITS/UvA
  7. Message-ID: <4jgde4$kgo_001@chem.uva.nl>
  8. References: <alanDozpsy.Kn6@netcom.com>
  9. NNTP-Posting-Host: ct-pc6.chem.uva.nl
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <alanDozpsy.Kn6@netcom.com>,
  13.    alan@netcom.com (Robert Alan Wright) wrote:
  14. |I recently posted a request for help in determining why a program which
  15. |was simply recompiled on VC++4.0 suddenly ran 3 times slower than the
  16. |same one did under VC++ 2.0.
  17. |
  18. |I went through all the usual steps of making sure that I had the right
  19. |compiler/link settings and even built my own version of the MFC
  20. |libraries to make sure they were fully optimized. 
  21. |
  22. |Upon further profiling and other exploration, I found out the problem:
  23. |THE VC++ 4.0 MEMORY ALLOCATION ROUTINES ARE WAY SLOWER!!!
  24. |
  25. |I don't understand how this can be, but I switched from using the
  26. |Microsoft malloc/realloc routines to my own versions, and now I
  27. |get about the same performance from the app that I used to.
  28. |As best I can tell, the new realloc routine is about 10 TIMES SLOWER
  29. |than the old one, and malloc is also slower. At this point, I
  30. |have replaced the use of almost all Microsoft MFC classes as well as
  31. |C/C++ runtime routines in order to get decent performance. I am quite
  32. |disgusted in the apparent low quality of their implementations.
  33. |
  34. |Can anyone offer any more rational explanation for this than that
  35. |Microsoft has horrible quality control? I'm having a hard time
  36. |believing they could do screw up this badly.
  37.  
  38. Check the the latest issues of Byte. I think, in the march issue
  39. they have an article on this. They were running preformance analysis
  40. programs which did a lot of malloc stuff with unreproducable
  41. results. I appeared that it had to do with the allignment of the allocated
  42. block in memory if I understood it well.
  43.  
  44. Hope this helps.
  45.  
  46. Danny
  47.